<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        Sticky
    </ui:define>

    <ui:define name="description">
        Sticky component positions the target component as fixed so that the component stays in window viewport during scrolling.
        Scroll down to see the sticky toolbar.
    </ui:define>

    <ui:define name="head">
        <style>
            .ui-sticky {
                top: 70px !important;
            }

            @media (max-width: 960px) {
                .ui-sticky {
                    top: 110px !important;
                }
            }
        </style>
    </ui:define>

    <ui:param name="documentationLink" value="/components/sticky"/>
    <ui:param name="widgetLink" value="Sticky-1"/>

    <ui:define name="implementation">
        <div class="card">
            <p:toolbar id="tb">
                <f:facet name="left">
                    <p:commandButton type="button" value="New" icon="pi pi-file" styleClass="mr-2" />
                    <p:commandButton type="button" value="Open" icon="pi pi-folder-open" styleClass="ui-button-success" />
                </f:facet>
                <f:facet name="right">
                    <p:commandButton type="button" title="Save" icon="pi pi-save" styleClass="warn-button mr-2" />
                    <p:commandButton type="button" title="Delete" icon="pi pi-trash" styleClass="ui-button-danger mr-2" />
                    <p:commandButton type="button" title="Print" icon="pi pi-print" styleClass="ui-button-help" />
                </f:facet>
            </p:toolbar>

            <div style="height:800px"></div>

            <p:sticky target="tb"/>
        </div>
    </ui:define>

</ui:composition>
